home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 42
/
Amiga Format AFCD42 (Issue 126, Aug 1999).iso
/
-serious-
/
programming
/
other
/
gui4cli
/
docs
/
tutorials
/
gadmods.gc
< prev
next >
Wrap
Text File
|
1999-05-14
|
2KB
|
99 lines
G4C
; ----- Gadget Modifiers : GadFont, GadTitle, GadKey, and GadTxt
WinBig -1 -1 400 150 "GadMods.gc"
WinType 11110001
; ---- Decorations
BOX 0 0 0 0 OUT RIDGE
SQUARE 6 18 192 63 2 NOFILL
SQUARE 202 18 192 63 2 NOFILL
SQUARE 6 82 192 63 2 NOFILL
SQUARE 202 82 192 63 2 NOFILL
LINE 6 81 392 81 3
LINE 198 18 198 144 3
LINE 200 18 200 144 3
xonLoad
GuiOpen GadMods.gc
xonClose
GuiQuit GadMods.gc
; ---- Headings
Text 130 4 100 12 'Gadget Modifiers' 17 NOBOX
Text 80 20 60 10 'GadFont' 7 NOBOX
Text 260 20 70 10 'GadTitle' 8 NOBOX
Text 25 84 190 10 'GadKey - Press them' 20 NOBOX
Text 270 84 60 10 'GadTxt' 8 NOBOX
; ------------ GadFont
xButton 50 30 100 12 "topaz 9"
GadFont topaz.font 9 000
xButton 50 45 100 15 "topaz 11"
GadFont topaz.font 11 000
xButton 30 63 140 12 "topaz 9 BOLD"
GadFont topaz.font 9 010
; ------------ GadTitle
xTextIn 220 40 40 12 'Above' v '' 32
GadTitle ABOVE
xTextIn 290 40 40 12 'Right' v '' 32
GadTitle RIGHT
xTextIn 220 54 40 12 'Below' v '' 32
GadTitle BELOW
xTextIn 330 54 40 12 'Left' v '' 32
;GadTitle LEFT
; ------------ GadKey
; Allows a key press as a 'short cut' for a button
xButton 40 96 32 12 'A'
GadKey A
Update Gadmods.gc 1 'That was A'
xButton 40 112 32 12 '_B'
; GadKey is not used here. Instead, the underscore character
; precedes the letter B, which has the same effect.
Update Gadmods.gc 1 'That was B'
xButton 20 128 82 12 "A space"
; Here, the NUMBER of the key is given instead of a character.
; '32' is a space, and the '#' sets the command to read a number.
; See elsewhere for coverage of VANILLA and RAW keys.
GadKey #32
Update Gadmods.gc 1 'A Space'
; A text gadget to show confirmation of the keypresses.
Text 110 104 60 12 ' ' 10 NOBOX
gadid 1
;-------------- GadTxt
; Position text left, centre, or right
Text 226 98 140 12 'Left' 4 BOX
GadTxt Left
; 'Centre' in real English ; 'Center' in American English
Text 226 113 140 12 'Centre' 6 BOX
GadTxt Center
Text 226 128 140 12 'Right' 5 BOX
GadTxt Right